package com.sohoometer.web.excel;

import com.nari.interfaces.model.IHeatMeterData24Gather;

/**
 * 本类所有方法本该封装在Bean中
 * 静态方法占用代码区而且常驻永久区(后续重构可以到Bean中)
 * @author zhoubo
 *
 */
public class HeatMeterData24GatherUtils {
	/**
	 * 热量的全名
	 * */
	public static String getSumHeatFullname(
			IHeatMeterData24Gather heatMeterData24Gather) {
		String fullName = "";
		String unit = "";
		if (heatMeterData24Gather == null) {
			return fullName;
		}
		Integer sumHeatUnit = heatMeterData24Gather.getSumHeatUnit();
		switch (sumHeatUnit) {
		case 1:
			unit = "MWh";
			break;
		case 2:
			unit = "kWh";
			break;
		case 3:
			unit = "Gj";
			break;
		default:
			break;
		}
		double sumHeat = heatMeterData24Gather.getSumHeat();
		fullName = sumHeat + unit;
		return fullName;
	}

	/**
	 * 总流量的全名
	 * */
	public static String getSumFlowFullname(
			IHeatMeterData24Gather heatMeterData24Gather) {
		String fullName = "";
		String unit = "";
		if (heatMeterData24Gather == null) {
			return fullName;
		}
		Integer sumFlowUnit = heatMeterData24Gather.getSumFlowUnit();
		switch (sumFlowUnit) {
		case 1:
			unit = "m3";
			break;
		case 2:
			unit = "dm3";
			break;
		case 3:
			unit = "cm3";
			break;
		default:
			break;
		}
		double sumFlow = heatMeterData24Gather.getSumFlow();
		fullName = sumFlow + unit;
		return fullName;
	}

	
	
	
}
